<?php
if ($this->session->userdata('admin'))
{
$this->load->view('header');  ?>
</div>
<div id="main">

<div id="right">
	        <h4>Cl&iacute;nica Real Felipe</h4>
					<!-- Derecha arriba-->
                    <div align="right"><a href='/RealFelipe/mantenedor/index'>&lt;&lt; Volver a Mantenedores</a></div>
					<div class="hr2"> </div>
					<h5></h5>
					<!-- Derecha abajo-->
					<!--<div class="read"><a href="#">read more</a></div>-->
		</div>
		
		<div id="left">
				<h3>Administraci&oacute;n</h3>
                <h4></h4>
				<!-- Izq arriba-->
						<div>
                        	<h>Mantenedores:&nbsp; <?php echo $title; ?></h>
                        </div>
                        <div>
                       	 <?php echo anchor(array($base_uri, 'view'), $scaff_view_records); ?> &nbsp;&nbsp;|&nbsp;&nbsp;
                       	 <?php echo anchor(array($base_uri, 'add'),  $scaff_create_record); ?>
                        </div>
				<div class="hr1"></div>
				<h4></h4>
				<div class="company">
				<!-- Izq abajo-->
                <table border="0" cellpadding="0" cellspacing="1" style="width:90%">
                 <tr>
                    <th>Editar</th>
                    <th>Eliminar</th>
                    <?php foreach($fields as $field): ?>
                    	<?php if($field != "password" and $field != "activation_code" ){?>
                    <th><?php echo $field; ?></th>
                    	<?php } ?>
                    <?php endforeach; ?>
                </tr>
                
                <?php foreach($query->result() as $row): ?>
                 <tr>
                    <td style="background:#FAFAFF;">&nbsp;<?php echo anchor(array($base_uri, 'edit', $row->$primary), $scaff_edit); ?>&nbsp;</td>
                    <td style="background:#FAFAFF;"><?php echo anchor(array($base_uri, 'delete', $row->$primary), $scaff_delete); ?></td>
                    <?php foreach($fields as $field): ?>	
                       <?php if($field != "password" and $field != "activation_code" ){?>
                    <td><?php echo form_prep($row->$field);?></td>
                        <?php } ?>
                    <?php endforeach; ?>
                 </tr>
                <?php endforeach; ?>
                </table>
                
                <?php echo $paginate; ?>
 		 </div>
</div>


<?php $this->load->view('footer'); 
}
else{
redirect('inicio/login');
//redirect('login'.$this->uri->uri_string());
}
/* End of file view.php */
/* Location: ./system/scaffolding/views/view.php */